IoT malware detection architecture using a novel channel boosted and squeezed CNN

Interaction between devices, people, and the Internet has given birth to a new digital communication model, the internet of things (IoT). The integration of smart devices to constitute a network introduces many security challenges. These connected devices have created a security blind spot, where cybercriminals can easily launch attacks to compromise the devices using malware proliferation techniques. Therefore, malware detection is a lifeline for securing IoT devices against cyberattacks. This study addresses the challenge of malware detection in IoT devices by proposing a new CNN-based IoT malware detection architecture (iMDA). The proposed iMDA is modular in design that incorporates multiple feature learning schemes in blocks including (1) edge exploration and smoothing, (2) multi-path dilated convolutional operations, and (3) channel squeezing and boosting in CNN to learn a diverse set of features. The local structural variations within malware classes are learned by Edge and smoothing operations implemented in the split-transform-merge (STM) block. The multi-path dilated convolutional operation is used to recognize the global structure of malware patterns. At the same time, channel squeezing and merging helped to regulate complexity and get diverse feature maps. The performance of the proposed iMDA is evaluated on a benchmark IoT dataset and compared with several state-of-the CNN architectures. The proposed iMDA shows promising malware detection capacity by achieving accuracy: 97.93%, F1-Score: 0.9394, precision: 0.9864, MCC: 0. 8796, recall: 0.8873, AUC-PR: 0.9689 and AUC-ROC: 0.9938. The strong discrimination capacity suggests that iMDA may be extended for the android-based malware detection and IoT Elf files compositely in the future.

www.nature.com/scientificreports/ communicating with these devices can also be exploited easily at IoT touchpoints. The security protocol cannot be uniformly implemented on all the devices. The manufacturing of the devices does not conform to some consistent standards. These security challenges are depicted in Fig. 1.
There are many heterogenic device structures and network protocols. They also possess a unique characteristic of processor heterogeneity 10 . So, the IoT industry lags unified security protocols for design and implementation. These weaknesses of IoT design enlarge the attack surface area and lead to security breaches. Cybercriminals utilize these attack surfaces for their illegal actions and exploit the vulnerabilities. Major cyber security concerns are host and Network Intrusions, malware attacks, compromised nodes, botnets, rootkits, ransomware, and DDoS. Therefore, a robust mechanism for detecting such activities is needed to quickly detect and mitigate these digital security exploits.
Research on this security aspect of IoTs has attracted increased academic, industrial, and state-level attention. Several research efforts have discovered potential cyber threats and provided countermeasures against cyberattacks. Cyber security experts believe most cyber exploits are carried out through malware attacks. Many research studies in the literature have attempted this challenge of malware detection. Static, dynamic, hybrid, and image-based malware analysis comes under this challenge's broad categories 11 .
Machine learning techniques have been extensively used for malware detection as they are more robust and give promising performance [12][13][14] . Anti-malware tools have achieved improved performance with the help of machine learning tools. Several machine learning algorithms have been employed for mining the vulnerabilities in the IoT firmware and IoT applications that can infect and corrupt the edge devices and the whole network of the connected devices. Recent machine learning advancements have proved their capabilities in detecting and classifying IoT malware 15 . Research studies for anti-malware applications have increased the inclination towards machine learning tools and techniques. Computational power improvement has also enhanced the performance of machine learning strategies for malware detection and classification. Application of the machine learning needs the features of the IoT malware to make their verdict.
As the malware databases are increased, deep learning techniques suited more pertinent for the detection and analysis. Recent research has been molded towards applying neural networks in the field of malware analysis. Neural networks, especially deep convolution neural networks (CNNs), have proven their competencies for feature extraction and feature identification in IoT malware. Deep CNNs build the malware detection systems by defining the discriminative features in IoT malware. Deep CNNs show enhanced performance as these models learn the complicated features of the IoT malware at different abstraction levels. Features learned in the lower layers are enriched in the upper lawyers. These features are extracted from the visual images of the problem domain.
The IoT Malware dataset exploited in the current study has not been addressed previously to the best of our knowledge. This study utilized the image representation of IoTs malware and benign files. It is observed that deep CNN has shown promising performance for the visual challenges 16 . We have proposed applying deep learning techniques for the malware detection challenge. The main contributions in the current study are described below: • A novel IoT Malware detection architecture (iMDA), using squeezing and boosting dilated CNN, is proposed for IoT Malware analysis using a new benchmark dataset. • The proposed iMDA incorporates the edge and smoothing, multi-path dilated convolutional, channel squeezing, and boosting operations in CNN. Edge and smoothing operations are employed within split-transformmerge (STM) blocks to extract local structure and minor contrast variation in the malware images. • STM blocks performed multi-path dilated convolutional operations, which helped to recognize the global structure of malware patterns. Additionally, channel squeezing and boosting are applied at different granular levels to get the reduced but prominent and diverse feature maps for capturing texture variations. • The proposed iMDA has shown significant performance compared with existing CNNs via TL in terms of standard performance metrics using MCC, F1-Score, AUC, accuracy, precision, and recall. www.nature.com/scientificreports/ The rest of the paper is structured as follows: the next section specifies related work in IoT malware analysis. "Methodology" section explains the proposed novel malware detection methodology. "Experimental setup" section describes the experimental setup. "Results and discussion" section discusses the results of our work. The is described in "conclusion" section.

Related work
IoT Malware analysis is carried out using static, dynamic, and hybrid analysis techniques. Nataraj et al. 17 were the first to perform the malware analysis based on greyscale images in 2011. Malware visual images are created by transcribing the eight-bit code value of the executable files to the corresponding greyscale value. Image texture features are extracted from these images 18 . The idea of texture-based analysis for IoT malware is emerging in context with deep learning. Evanson et al. 19 proposed an approach for malware analysis using texture images of malware files and machine learning in IoTPOT 20 for Bashlite and Mirai. They came up with the Haralick image texture features from the grey-level co-occurrence matrix and used machine learning classifiers. Carrilo et al. 21 explored the malware forensic and reverse engineering capabilities for malware characterization. They first used machine learning to detect Linux-based system malware of IoT. They also discovered new malware detection by using clustering techniques. They exploited the dataset provided by E. Cozzi et al. 22 . Ganesh et al. 23 exploited machine learning capabilities to detect Mirai botnet attacks in IoTs. They applied ANN to evaluate their approach to the N-BaIoT dataset. Shudong Li et al. 24 used ensemble learning for mining the malicious code in the cloud computing environment. Bendiab et al. 25 applied deep learning for malware analysis traffic IoT. They applied ResNet50 for the experimental verification of their concept using a 1000 network (pcap) file.
Kyushu et al. 26 proposed a lightweight approach for IoT malware detection. They targeted the DDoS malware for their study and extracted the malware images from malware binaries in IoTPOT 20 . Their experimental setup showed performance for detecting the DDoS malware and good-ware. Ren et al. 27 gave an end-to-end malware detection mechanism for Android IoT devices. They collected 8000 benign and 8000 malicious APK files from the Google Play store and VirusShare, respectively. They used the significance of deep learning for the evaluation of their concept. Hussain et al. 28 used application intent along with a supervised learning-based approach for the intelligent identification of Android-based malware. Naeem et al. 29 detected the malware in Industrial IoT by proposing deep CNN-based traffic, behavior, and log databases analysis. They utilized the color images of the targeted malware for detection in the Leopard Mobile dataset.
Shafiq et al. 30 used the Bot-IoT dataset for the correct malware feature selection and showed that their proposed method reached the accuracy of 965 for accurate detection of IoT malware over the network. They used the bijective soft set selection approach 31 for the effective ML algorithm selection for the Bot-IoT network traffic dataset. They also used wrapper-based feature filtering and selection techniques 32 .
However, the evaluation of the reported work is presented in Accuracy and Precision. Practically, malware datasets are imbalanced. Therefore, other evaluation metrics must be considered. In this regard, our proposed research work exploited the benchmark Kaggle IoT dataset. Performance evaluation metrics F1-Score, MCC, AUC-PR, and AUC-ROC are also evaluated, along with Accuracy and Precision. The comprehensive workflow is presented in Fig. 2.

Methodology
Data augmentation. CNN models give better generalization upon large labeled data. Sometimes, the data points for the model training are not adequate. The data augmentation technique produces the artificial sample points by applying image transformation operations [33][34][35] . These operation includes rotation (0-360 degree), scaling (0.5-1), shearing (− 0.5, + 0.5) and reflection (in left and right direction). The augmentation process helped improve generalization and made the dataset more robust for detecting IoT malware.
Proposed IoT malware detection architecture (iMDA). This study proposes a novel image-based IoT malware detection architecture, iMDA. The suggested architecture discriminates the malware image sample from benign images. Spit-Transform-Merge (STM) is the main building block of this architecture. Three STMbased blocks concept is systematically implemented using region and edge detection operations. www.nature.com/scientificreports/ The concept of channel boosting is imparted for high precision, improving the detection rate. Implementation details of the proposed architecture are highlighted in Fig. 3A. The performance of the proposed architecture is compared with the existing CNN models using TL-based implementation, as shown in Fig. 3B.
Proposed channel squeezing and boosting blocks. Deep CNN models are powerful and robust for their texture feature mining abilities. These models use convolutional operations for exploiting structural information in the image data. These operations are used to extract the dataset's features according to the target domain. This innovative feature of the deep CNN is utilized in the current architecture for IoT malware detection. This architecture is tailored by proposing a concatenated STM-based channel boosting approach 36 , Fig. 4A.
The proposed STM block comprises a stack of four blocks, as shown in Fig. 4B. Details of the operations performed in each block are shown in Fig. 4C. Block B and Block C employ the same convolutions, batch normalization, and Relu operation with max and average pooling operation. Two convolution operations employed in each block are used to extract the feature information at the detailed and abstract levels, respectively. Block D and Block E employ the three-convolution operation. Two operations are used for the detailed features extraction, while one is used for the abstract level feature information extraction.
The STM block splits the input IoT malware image data into four branches to feed the four blocks of the STM. These blocks learn the region and edge-based informative features at a different level of abstraction from the input dataset. This learning helps to gather the highly discriminating features of the IoT malware at a high and detailed level. This info is imparted into different channels from each block. Information infused in other channels is concatenated at the exit of the STM block. This channel-boosted feature space is rich in diverse levels of textural feature information about the malware.
Equation (1)      www.nature.com/scientificreports/ Implementation of customized existing CNNs. CNN architectures AlexNet, VGG16, inceptionv3, VGG19, Resnet50, Shufflenet, DenseNet201, Xception, and GoolgeNet are selected for a fair comparison with the proposed architecture. To achieve substantial performance, these models are initially trained on the Ima-geNet. These trained models are fine-tuned according to the target IoT malware dataset. Then these models are trained and tested using the target dataset using an 80-20 train-test split.

Experimental setup
Dataset. Linux operating system (OS) is becoming the dominant for IoT devices 37 . Hence, this operating system has become a prospecting target for the malware developer community. Linux uses ELF file format for the deployment of applications or firmware. ELF files are cross plate form in nature and come in two binary formats, packed and unpacked binaries 38 . The IOT_Malware dataset used in this study is the image representation of unpacked ELF binary files for malware and benign applications 39 . This dataset is a standard Kaggle benchmark dataset for IoT malware detection challenges. There are 14,733 greyscale images of malware application ELF binaries and 2486 greyscale images of legitimate application ELF binaries. Visualization of benign and malicious files is shown in Fig. 5.

Implementation details. The implementation of the proposed iMDA is simulated using MATLAB-2021a
on Nvidia® GTX 1060-T, GPU-enabled Dell Core I i5-7500. It took ~ 1-2 h to train a model on the said settings. One epoch took 7-10 min on Nvidia-Tesla K-80, while a single IoT malware image took approximately 2 s for detection.

Performance evaluation metrics.
In the current study, we have employed performance evaluation metrics Accuracy, Precision, Recall, F1-Score, and MCC, as shown in Eqs. (6)(7)(8)(9)(10). The details of these performance metrics are described in Table 1 Several statistical measures are used as performance metrics for binary classification using four quadrants confusion matrix, i.e., TP, TN, FP, and FN. These metrics are selected according to the problem under investigation. There is no agreed-upon performance metrics for two or multi-class problem. The severity of the problem gives direction toward the selection of performance metrics. For an imbalanced dataset, some performance metrics show over-optimistic results. The Matthews correlation coefficient (MCC) is considered an attested statistical measure. It gives a high score for prediction only if all four quadrants are proportionally high for both positive and negative classes 40 .

Results and discussion
Performance analysis of the proposed iMDA. The performance of the proposed iMDA is assessed on a standard IoT Malware dataset. F1-Score and MCC are considered standards for performance evaluation for an imbalanced dataset. F1-Score and MCC are used for assigning weightage to both the precision and sensitivity. The proposed architecture converged smoothly and reached the optimal value quickly, as shown in the training plots of the model. Misclassification occurred due to the intrinsic code similarity between the malicious   www.nature.com/scientificreports/ Performance comparison with existing CNNs. The performance of the IoT malware detection architecture, iMDA, is also compared with existing models, AlexNet, VGG16, inceptionv3, VGG19, Resnet50, Shufflenet, DenseNet201, Xception, and GoolgeNet. Improved performance is shown in Table 2. CNN models seek to find the identifiable textures and patterns in the image dataset. Our proposed malware detection architecture, iMDA, better explored textural variation in the malware images by systematically using region and boundary information through the Avg and Max-pooling operations. Channel split-transform-merge technique helped to extract the features at different granularity. Incorporating the concepts mentioned earlier in CNN improved the performance of the proposed architecture over the existing models. This study reported the significance of performance using deep learning architecture and quantified it using MCC, F1-Score, AUC-ROC, Accuracy, Precision, and Recall.
Detection capability of the proposed iMDA. The effectiveness of a malware detection framework is mainly assessed through precision rate and detection rate. Accurately detecting infused malware in a system is the first parameter to secure and control the spread. False alarms may be increased if only the precision of the proposed detection technique is improved. Decreasing the false alarm may degrade the detection rate. Keeping in mind this intuition, the proposed model leveraged the difference by comparing F1-Score, the harmonic mean of both parameters. Minimum and maximum performance gains against the existing CNN models are shown in Fig. 6. Results of the proposed iMDA are summarized in Table 3. A comparison of detection performance of our proposed model using F1-Score, Accuracy, and MCC with the existing model is shown in Fig. 7. In contrast, customized existing CNNs are compared and found that few models showed considerably good precision with poor recall. www.nature.com/scientificreports/ Feature space-based analsis of the proposed iMDA. The decision-making of the proposed architecture is better analyzed with the help of feature space visualization. Better discrimination factor of the model is associated with the prominent visual features. This distinction helps to improve the learning and lower the variance of the model. The feature space visualization for the principal components of our proposed iMDA is shown in Fig. 8. Channel squeezing and channel boosting used in STM blocks helped to capture the discriminative features of the IoT malware images at a multi-level. Additionally, STM extended the reduced prominent feature with the help of channel concatenation. The feature space visualization for the proposed iMDA showed an improvement in identifying the distinct and diverse features, hence improving the detection of the IoT malware files.
Auc-roc and auc-pr based analysis. The optimal performance of the model is also best understood by the ROC and PR plots, Fig. 9. These plots show the bifurcation capability of the models at an optimal threshold value. Our proposed iMDA showed high sensitivity along with a decreased false positive rate.

Conclusion
Analysis of malware in IoT is an early line of defense in securing this world of connected devices from cyberattacks. Malware analysis help to identify and designate the malicious code segments hidden in the legitimate files. This malicious code snippet is present according to the malware signature or obfuscated otherwise. The obfuscation techniques hide the malicious code lines from pattern/signature matching. These lines may be distributed or intermixed with the legitimate line over the complete file. The IoT-specific malicious patterns are detected in this study by developing iMDA, new CNN architecture: iMDA based on the ideas of dilated convolutional operations, channel squeezing, and boosting. The proposed architecture discriminates the malware from benign based on textural, contrast, and pattern variations. The proposed iMDA outperformed existing CNN and achieved the best result for Accuracy (97.33%), MCC (0.8796), F1-Score (93.94), AUC-ROC (0.9938), and AUC-PR (0.9689). In the future, the proposed iMDA may be extended for the android-based malware detection and IoT Elf files compositely. www.nature.com/scientificreports/   www.nature.com/scientificreports/

Data availability
The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.